<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::group(['namespace' => 'Admin'], function () {
    Route::any('/admin/login', 'UserController@login'); //后台登录页面
    Route::get('/admin/logout', 'UserController@logout'); //后台登出
    Route::get('/admin/message', 'MessageController@index'); //状态页面
    Route :: group( [ 'middleware' => 'authentication' ] , function( ) {
        Route::get('/test', 'UserController@test'); //test
        Route::get('/admin', 'AdminController@index'); //后台首页

        //管理员
        Route::get('/admin/usermember/index', 'AdminController@adminlist');//用户管理界面
        Route::any('/admin/info/index', 'AdminController@admininfo');//新增管理员资料
        Route::any('/admin/info/index/{id}/{act}', 'AdminController@admininfo');//修改管理员资料
        Route::delete('/admin/info/delete', 'AdminController@deladmin');//删除管理员

        Route::get('admin/article/index', 'AdminController@articleshow');//已发文章界面
        Route::get('admin/article/show', 'AdminController@uploadarticle');//创建文章
    });
});

